UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ErumZxsvGFn2hrbrnJByZbiZ4644Kq9AjPw80jhro4c='
WHERE
key_id = 'f1c1ba7b9dd21feffe6092e0af0768d6910c54cd7b221587c4ebe095ab5dc840'
AND (
token = 'ErumZxsvGFn2hrbrnJByZbiZ4644Kq9AjPw80jhro4c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)