UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3MnemMxDof9WWKU4DSk/afGVnVzGrUxzizhctLVdi+Q='
WHERE
key_id = '80920b2a370466d5b3c38aff12270994e3cfc59ecefad738454fb19a95bbcc41'
AND (
token = '3MnemMxDof9WWKU4DSk/afGVnVzGrUxzizhctLVdi+Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)