UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GYTTTeSbjsij02FSMRfKdcJiqHaFP9U4+IQYVIsQl9I='
WHERE
key_id = 'a0879da4cd08d1a787cc807615e1f26d07c8e2d276c3cd83dd9117fabfabb56a'
AND (
token = 'GYTTTeSbjsij02FSMRfKdcJiqHaFP9U4+IQYVIsQl9I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)