UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '++BcxnR3LRkQoQQDgW6hn1Z7ubQU2zXwm+OCl+qe/Is='
WHERE
key_id = 'b836e06e68a2a397acba3ca384967f6430104f2c97fddbd89760337c82c21a06'
AND (
token = '++BcxnR3LRkQoQQDgW6hn1Z7ubQU2zXwm+OCl+qe/Is='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)