UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JDIGJlueXsXU7twQud5R+Hq6YScw01j7GzPd+AReegg='
WHERE
key_id = 'fa433adaff5005ba8faaa7474552e6c4e8da67bd6103eb98a4c760b4a896e7b8'
AND (
token = 'JDIGJlueXsXU7twQud5R+Hq6YScw01j7GzPd+AReegg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)