UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '11/RzB/aMYFJpxO4S4r9IodcvWyRRKhVRdl3vamBTBw='
WHERE
key_id = 'c3088b3363ba0a753c8e52a9a4668d41724ab04c00bfb00315bb597ff41ceaec'
AND (
token = '11/RzB/aMYFJpxO4S4r9IodcvWyRRKhVRdl3vamBTBw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)