UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vKnx1q1Ke4p1RML3PQQEgrwjlchDWVt8cR2qaL/ixAc='
WHERE
key_id = 'faaa13c7008efdd2acf8a3a91cb262eecb0e24b5a396ba4ab18ccc34685ebe60'
AND (
token = 'vKnx1q1Ke4p1RML3PQQEgrwjlchDWVt8cR2qaL/ixAc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)