UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fYxHVmiFmriIHEjXUvoJCLgY8NGCX+r/jB8SNxbiTFA='
WHERE
key_id = 'fbf0a3a8cf8bb72a6d2d1d75e350ff1d7cf42ef892c0a439733aaee43dc3067d'
AND (
token = 'fYxHVmiFmriIHEjXUvoJCLgY8NGCX+r/jB8SNxbiTFA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)