UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4ZckoFOwxOPXXV9Kyzm1jwOQFcz1rCGXNc7Hl/aEt7A='
WHERE
key_id = '7634c4dff70e10dcbddf47e2b505f47ed660ed221c156bd42222464d792a9e08'
AND (
token = '4ZckoFOwxOPXXV9Kyzm1jwOQFcz1rCGXNc7Hl/aEt7A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)