UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FftpJK6runQ5KfHE/InVgrUk6yCNOkng3l/0s6joJpI='
WHERE
key_id = '3f807556d3e338431dd91bd96a9ab9b92c557538c3d1ef77a05f11f376d218ba'
AND (
token = 'FftpJK6runQ5KfHE/InVgrUk6yCNOkng3l/0s6joJpI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)