UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'woTuRWHrtcCnQtD8zkU5iypv5U47ELcXI3T6l/6Indg=' 
WHERE 
  key_id = 'fa7f5a7afb15f0e28f3db7691995b82045fa02135b39abb7ed7e64b8f561f817' 
  AND (
    token = 'woTuRWHrtcCnQtD8zkU5iypv5U47ELcXI3T6l/6Indg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040