UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Ejx7JO+FaRIjYu6rbRBPINvqw5Lx+AmQtWpGFMKnBs='
WHERE
key_id = '25a7146145fd0138130ecf6d472228c5f03cca35065cdaf8d81af2d818a7769d'
AND (
token = '/Ejx7JO+FaRIjYu6rbRBPINvqw5Lx+AmQtWpGFMKnBs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)