UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'areYZxHBFY90mzbYKnoaFA8kRFypg6IeqkJNSQxoQ/8='
WHERE
key_id = '8b8d02779408ed8a1a4bddf2f7b9160b5f9ef7bd8566439ef161107a0cae3979'
AND (
token = 'areYZxHBFY90mzbYKnoaFA8kRFypg6IeqkJNSQxoQ/8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)