UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TqlenucuhuvHZduTbgGGJPx4K6cHrFvN8MyDLPr/QLU='
WHERE
key_id = '0f1a2c1c31b21ba5e4eccec2da82ad6f88b342d7b8ca77814f77dce4dac5d65a'
AND (
token = 'TqlenucuhuvHZduTbgGGJPx4K6cHrFvN8MyDLPr/QLU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)