UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nVSIGp8mooQpxSw5YjwEa22rSnCOrQQC447hAH5wono='
WHERE
key_id = '4e31d546eeb02e39161b12cb272c1cf5cbd4bdebe45b95b24ee457b79f2002a1'
AND (
token = 'nVSIGp8mooQpxSw5YjwEa22rSnCOrQQC447hAH5wono='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)