UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rOTZmbJ50gvvD1dRLx68K2ZMpn2a4SzQWy6Z/yGHe/M='
WHERE
key_id = 'abab37437a941c01cd861a9af8323b9189679616254ed1fd6ef4aa1ca21211b5'
AND (
token = 'rOTZmbJ50gvvD1dRLx68K2ZMpn2a4SzQWy6Z/yGHe/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)