UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/P24EXNnwXO4xv9Rpye8zbjMUNL16YMumfZyuNn2dSI=' 
WHERE 
  key_id = '85e04c8358cbf7ead035545720cd7bf13de34f612affddb3bd38da05c4058b74' 
  AND (
    token = '/P24EXNnwXO4xv9Rpye8zbjMUNL16YMumfZyuNn2dSI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033