UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VfcIwTnIMwEriLoQPehHm7Yo92EtSARHwP4X6BZZ0EQ='
WHERE
key_id = '0e63d6c900f5814c219a763688a5efb6f78c35b56604ab1e9ed6abc4eb7807fa'
AND (
token = 'VfcIwTnIMwEriLoQPehHm7Yo92EtSARHwP4X6BZZ0EQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)