UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9UgM+TKBaP5lhsx1Z6iMWeTrZ7lIKYIOCfPI/kwEsHc='
WHERE
key_id = 'e2514640f7e35f38e5a5bc6785d8d44afbb20fb6fed6e7abbd43307e83befc41'
AND (
token = '9UgM+TKBaP5lhsx1Z6iMWeTrZ7lIKYIOCfPI/kwEsHc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)