UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qCw2mMG1f0MLqFrdSZ6GL+Lw3yscvTzOCL6xQHDGKbo='
WHERE
key_id = 'f3e5902ba591f5e588842ae73b0c762236ade8aa7197fcaa0e10a9520d1b0a88'
AND (
token = 'qCw2mMG1f0MLqFrdSZ6GL+Lw3yscvTzOCL6xQHDGKbo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)