UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MZjX/ohLGcF6WvFKEfTpups41yJRBVPRa/0yBo2aNZA='
WHERE
key_id = '2a53349156617758e102ce13af214debac63de6877306e389678e284418e5012'
AND (
token = 'MZjX/ohLGcF6WvFKEfTpups41yJRBVPRa/0yBo2aNZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)