UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FHFUBp5sjQzXlwCyUaMNiQoskSMq7wFWA+Lk29EKIn0='
WHERE
key_id = 'c73f23a8410b36ab8804754e76722ee061db85d6fb2101d42c63bd18d85c4a42'
AND (
token = 'FHFUBp5sjQzXlwCyUaMNiQoskSMq7wFWA+Lk29EKIn0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)