UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1L+RLoBEVCvpZm1kVCv8l9h7qy1rraSxaY6Iy/sNJd0='
WHERE
key_id = '738492fe328a993dadfef6cfed43466cd24ba8f9aaf9973fc1bcd951046f7c1c'
AND (
token = '1L+RLoBEVCvpZm1kVCv8l9h7qy1rraSxaY6Iy/sNJd0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)