UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3/hMcFHVfB8sb5iE2Uzw1pFMU4XcOdn49R0rcXhWojo='
WHERE
key_id = '888074ea26bd77f58667498531fbdeb8a9878c0081b18fc9cb61dd9a5d55bdc5'
AND (
token = '3/hMcFHVfB8sb5iE2Uzw1pFMU4XcOdn49R0rcXhWojo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)