UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UrIkNgLVRJDzRKpPdD+n1p7JIXqssvJVClzOM662Nfo='
WHERE
key_id = '7d1e3ef8fde57bd47798b0680f3b10b42aea996279a27051c599ae80ecddb0a1'
AND (
token = 'UrIkNgLVRJDzRKpPdD+n1p7JIXqssvJVClzOM662Nfo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)