UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+zEet88XhCnbfk/cMlvMcuZzIs1/2/yBc5CfcXCvIfQ='
WHERE
key_id = 'dbe8308a8a018e106824d38e24164bf2093619ddeb5201434f183fe6989853ad'
AND (
token = '+zEet88XhCnbfk/cMlvMcuZzIs1/2/yBc5CfcXCvIfQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)