UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GEivLIWeoerQZuMT/++5ba5OOC+X6y9pN80iUY950yg='
WHERE
key_id = 'de5b97a3dd0cf5671129c8313b1f232c7e29b9522143a402fbb09141751876d3'
AND (
token = 'GEivLIWeoerQZuMT/++5ba5OOC+X6y9pN80iUY950yg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)