UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's2BFtsCbU/2mCNx065P7S6/+KBCst5kEEzpJkJt0LzU='
WHERE
key_id = 'be41cbc26ff78b62224c1553316be2fc870502e57624013bd31428a8feaab144'
AND (
token = 's2BFtsCbU/2mCNx065P7S6/+KBCst5kEEzpJkJt0LzU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)