UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'KUAE/VqDrW4egSxn3C4p3sZwTqoc6eq4AL7sQsGu+bY=' 
WHERE 
  key_id = '68eb08baaf764fe0bbee04742a22ac1aebf9027fd75abc8765cf18181cfda35c' 
  AND (
    token = 'KUAE/VqDrW4egSxn3C4p3sZwTqoc6eq4AL7sQsGu+bY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043