UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mwnEQcpcevuyr64LWS5M55tIr5/zE8iEFsStF0BVTnQ='
WHERE
key_id = '60d15e4d47a776501620ab06e528ba5dcb5a6eb38715ab733498bfecc0632d1d'
AND (
token = 'mwnEQcpcevuyr64LWS5M55tIr5/zE8iEFsStF0BVTnQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)